const mongoose = require("./db")



let ShopSchema = new mongoose.Schema({
    id: String,
    name: String,
    cate: String,
    price: Number,
    shopcode: String,
    status:{
        type:Number,
        default:0
    },
    time:{
        type:Date,
        default:Date.now()
    }
    
})

let ShopModel = mongoose.model("shop", ShopSchema)

let UserSchema = new mongoose.Schema({
    username: String,
    password: String
})

let UserModel = mongoose.model("user", UserSchema)

module.exports = {
    ShopModel,
    UserModel
}